<?php
/**
 * @file archive.php(归档页)
 * @package Japan-Style
 */
?>
<?php get_header(); ?><div id="content">
<?php if (have_posts()) : $post = $posts[0]; ?><div class="post post-list">
	<?php /* If this is a category archive */ if (is_category()) { ?>
		<h2>Archive for the &#8216;<?php single_cat_title(); ?>&#8217; Category</h2>
	<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
		<h2>Posts Tagged &#8216;<?php single_tag_title(); ?>&#8217;</h2>
	<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h2>Archive for <?php the_time('F, Y'); ?></h2>
	<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h2>Archive for <?php the_time('F jS, Y'); ?></h2>
	<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h2>Archive for <?php the_time('Y'); ?></h2>
	<?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<h2>Author Archive</h2>
	<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h2>Blog Archives</h2>
<?php } ?>
<div id="navigation">
		<div class="alignleft"><?php next_posts_link('&laquo; 前往下一页') ?></div>
		<div class="alignright"><?php previous_posts_link('返回上一页 &raquo;') ?></div>
</div>
<?php while (have_posts()) : the_post(); ?>
	<div class="post" id="post-<?php the_ID(); ?>">
		<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
		<?php the_excerpt(); ?>
	 	<div class="post-info">File Under <?php the_category(', ') ?> | <?php the_tags('关键字: ', ', ', ''); ?><br /><?php the_author() ?> on <?php the_time('F jS, Y') ?> | <?php comments_popup_link('No Comments ', '1 Comment ', '% Comments '); ?><?php edit_post_link('Edit', '&nbsp;|&nbsp;'); ?></div>
	</div>
<?php endwhile; ?></div>
<div id="pages"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>
<?php else : ?><p class="center">对不起,没有您要找的归档。</p><?php endif; ?>
</div><!-- #content -->
<?php get_sidebar(); ?><?php get_footer(); ?>